﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class SqliteStatus
    {

        /*
    ** CAPI3REF: Status Parameters
    ** EXPERIMENTAL
    **
    ** These integer constants designate various run-time status parameters
    ** that can be returned by [StatusHelper.GetStatus()].
    **
    ** <dl>
    ** ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>
    ** <dd>This parameter is the current amount of memory checked out
    ** using [Malloc.sqlite3_malloc()], either directly or indirectly.  The
    ** figure includes calls made to [Malloc.sqlite3_malloc()] by the application
    ** and internal memory usage by the SQLite library.  Scratch memory
    ** controlled by [ConfigOption.SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
    ** memory controlled by [ConfigOption.SQLITE_CONFIG_PAGECACHE] is not included in
    ** this parameter.  The amount returned is the sum of the allocation
    ** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>
    ** <dd>This parameter records the largest memory allocation request
    ** handed to [Malloc.sqlite3_malloc()] or [Malloc.sqlite3_realloc()] (or their
    ** internal equivalents).  Only the value returned in the
    ** *pHighwater parameter to [StatusHelper.GetStatus()] is of interest.  
    ** The value written into the *pCurrent parameter is undefined.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>
    ** <dd>This parameter returns the number of pages used out of the
    ** [pagecache memory allocator] that was configured using 
    ** [ConfigOption.SQLITE_CONFIG_PAGECACHE].  The
    ** value returned is in pages, not in bytes.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
    ** <dd>This parameter returns the number of bytes of page cache
    ** allocation which could not be statisfied by the [ConfigOption.SQLITE_CONFIG_PAGECACHE]
    ** buffer and where forced to overflow to [Malloc.sqlite3_malloc()].  The
    ** returned value includes allocations that overflowed because they
    ** where too large (they were larger than the "sz" parameter to
    ** [ConfigOption.SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
    ** no space was left in the page cache.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
    ** <dd>This parameter records the largest memory allocation request
    ** handed to [pagecache memory allocator].  Only the value returned in the
    ** *pHighwater parameter to [StatusHelper.GetStatus()] is of interest.  
    ** The value written into the *pCurrent parameter is undefined.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>
    ** <dd>This parameter returns the number of allocations used out of the
    ** [scratch memory allocator] configured using
    ** [ConfigOption.SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not
    ** in bytes.  Since a single thread may only have one scratch allocation
    ** outstanding at time, this parameter also reports the number of threads
    ** using scratch memory at the same time.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
    ** <dd>This parameter returns the number of bytes of scratch memory
    ** allocation which could not be statisfied by the [ConfigOption.SQLITE_CONFIG_SCRATCH]
    ** buffer and where forced to overflow to [Malloc.sqlite3_malloc()].  The values
    ** returned include overflows because the requested allocation was too
    ** larger (that is, because the requested allocation was larger than the
    ** "sz" parameter to [ConfigOption.SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
    ** slots were available.
    ** </dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
    ** <dd>This parameter records the largest memory allocation request
    ** handed to [scratch memory allocator].  Only the value returned in the
    ** *pHighwater parameter to [StatusHelper.GetStatus()] is of interest.  
    ** The value written into the *pCurrent parameter is undefined.</dd>)^
    **
    ** ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>
    ** <dd>This parameter records the deepest parser stack.  It is only
    ** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^
    ** </dl>
    **
    ** New status parameters may be added from time to time.
    */
        //#define SQLITE_STATUS_MEMORY_USED          0
        //#define SQLITE_STATUS_PAGECACHE_USED       1
        //#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
        //#define SQLITE_STATUS_SCRATCH_USED         3
        //#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
        //#define SQLITE_STATUS_MALLOC_SIZE          5
        //#define SQLITE_STATUS_PARSER_STACK         6
        //#define SQLITE_STATUS_PAGECACHE_SIZE       7
        //#define SQLITE_STATUS_SCRATCH_SIZE         8
        public const int SQLITE_STATUS_MEMORY_USED = 0;
        public const int SQLITE_STATUS_PAGECACHE_USED = 1;
        public const int SQLITE_STATUS_PAGECACHE_OVERFLOW = 2;
        public const int SQLITE_STATUS_SCRATCH_USED = 3;
        public const int SQLITE_STATUS_SCRATCH_OVERFLOW = 4;
        public const int SQLITE_STATUS_MALLOC_SIZE = 5;
        public const int SQLITE_STATUS_PARSER_STACK = 6;
        public const int SQLITE_STATUS_PAGECACHE_SIZE = 7;
        public const int SQLITE_STATUS_SCRATCH_SIZE = 8;
    }
}
